﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace S.Breeding.Infrastructure
{
    public interface IRepository<T> where T : class,new()
    {
        Task<T> GetAsync(int id);
        T Get(int id);
        Task<int> CreateAsync(T entity);
        Task<int> DeleteAsync(int Id);
        Task<int> DeleteAllAsync(Expression<Func<T, bool>> expression);
        Task<int> UpdateAsync(T entity);
        Task<IQueryable<T>> All();
        Task<IQueryable<T>> AllAsync();
        Task<List<T>> GetValues(Expression<Func<T, bool>> expression);

    }
}
